//
//  NSString+PP.h
//  pickpic
//
//  Created by Jinxiao on 10/7/16.
//  Copyright © 2016 MicroDream. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (PP)

- (NSString *)thumbnailStringByConstrainingToWidth:(CGFloat)width;
- (NSString *)thumbnailStringByConstrainingToHeight:(CGFloat)height;

- (void)applyToImageView:(UIImageView *)imageView;
- (void)applyToImageView:(UIImageView *)imageView placeholder:(UIImage *)placeholder;
- (void)applyToImageView:(UIImageView *)imageView placeholder:(UIImage *)placeholder completion:(void (^)(void))completion;
- (void)applyToImageView:(UIImageView *)imageView placeholder:(UIImage *)placeholder progressive:(void (^)(double progress))progressive completion:(void (^)(void))completion;
- (void)applyToImageView:(UIImageView *)imageView placeholder:(UIImage *)placeholder progressive:(void (^)(double))progressive errorCompletion:(void (^)(NSError *error))errorCompletion;

@end
